package com.hall.service;

import com.hall.dao.MyEditorMapper;
import com.hall.dao.RetrievPasswordMapper;
import com.hall.pojo.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

public class RetrievPasswordServesImpl implements RetrievPasswordServes {
    @Autowired
    RetrievPasswordMapper retrievPasswordMapper;

    @Override
    public SysUser getUsernameByPhone(String phone) {
        return retrievPasswordMapper.findLoginName(phone);
    }

    @Override
    public int setPasswordByPhone(String password, String phone) {
        System.out.println("提交的修改值为------------------" + password + phone);
        return retrievPasswordMapper.retrievPassword(password, phone);
    }

    public void setRetrievPasswordMapper(RetrievPasswordMapper retrievPasswordMapper) {
        this.retrievPasswordMapper = retrievPasswordMapper;
    }
}
